<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>宿舍信息管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/students/dmsStudents/distrbuton">宿舍信息列表</a></li>	
	</ul>
	<form:form id="searchForm" modelAttribute="dmsDormitory" action="${ctx}/students/dmsStudents/distribution?stuId=${stuId}" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
	
		
		<ul class="ul-form">
			<li><label>楼号：</label>
				<form:input path="floor" htmlEscape="false" maxlength="20" class="input-medium"/>
			</li>
			<li><label>入住人数：</label>
		   <form:select path="roomBed" class="input-xlarge write required" style="width:170px;">
				<form:option value="" label="请选择"/>
				<form:option value="1" label="1人"/>
				<form:option value="2" label="2人"/>
				<form:option value="3" label="3人"/>
				<form:option value="4" label="4人"/>
				<form:option value="5" label="5人"/>
				<form:option value="6" label="6人"/>
				<form:options items="${fns:getDictList('roomBed')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				
				<th>楼号</th>
				<th>宿舍号</th>
				<th>床位</th>
				<th>房间空床位</th>
				<shiro:hasPermission name="dormitory:dmsDormitory:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="dmsDormitory">
			<tr>
				
				<td>
					${dmsDormitory.floor}
				</td>
				<td>
					${dmsDormitory.dormitoryNumber}
				</td>
				<td>
				   ${dmsDormitory.bed}
				</td>
				<td>
					${dmsDormitory.roomBed}
				</td>
				<shiro:hasPermission name="dormitory:dmsDormitory:edit"><td>
    				<a href="${ctx}/students/dmsStudents/updateStatus?dormitoryId=${dmsDormitory.id}+&stuId=${stuId}">确认入住</a>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>